package com.hy.erp.inventory.pojo;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Index;
import org.hibernate.annotations.IndexColumn;
//import org.jboss.seam.annotations.Name ;

import com.hy.erp.inventory.dao.interfaces.ICargoSpaceDao;
import com.hy.erp.inventory.pojo.interfaces.ICargoSpace;
import com.hy.erp.inventory.pojo.interfaces.ICustomer;
import com.hy.erp.inventory.pojo.interfaces.ISupplier;
import com.hy.mydesktop.shared.persistence.domain.gxt.MyBaseModel;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
//import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-10-5；时间：上午09:27:26</li>
 * <li>类型名称：CargoSpace</li>
 * <li>设计目的：仓位</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */
//@ Entity 
//@Table(name="t_cargoSpace") 
/*@Name("cargoSpace")
@DaoA(ICargoSpaceDao.class)*/
public class CargoSpace extends MyBaseModel //implements IPositonType
//public class CargoSpace extends AbstractPersistentEntity implements  ICargoSpace
{
	/**
	 * <ul>
	 * <li>开发作者：李冰</li>
	 * <li>设计日期：2010-9-24；时间：下午05:45:54</li>
	 * <li>字段类型：long；字段名称：serialVersionUID</li>
	 * <li>设计目的：</li>
	 * </ul>
	 * <ul>
	 * <b>修订编号：</b>
	 * <li>修订日期：</li>
	 * <li>修订作者：</li>
	 * <li>修订原因：</li>
	 * <li>修订内容：</li>
	 * </ul>
	 */
	private static final long	serialVersionUID	=
														8629425408377515566L ;

	
@ Column ( name = "coment" , length = 200 )
	@ Index ( name = "comentIndex" )
	public String getComent ( )
	{
		return this.get(ICargoSpace.COMENT) ;
	}

	public void setComent(
									String coment )
	{
		super.set (ICargoSpace.COMENT , coment );
	}

	
	
	@ Column ( name = "name" , length = 50 )
	public String getName ( )
	{
		return this.get(ICargoSpace.NAME) ;
	}

	public void setName (
							String name )
	{
		super.set (ICargoSpace.NAME , name );
	}
	@ Column ( name = "description" , length = 100 )
	@ Index ( name = "descriptionIndex" )
	public String getDescription ( )
	{
		return this.get(ICargoSpace.DESCRIPTION) ;
	}

	public void setDescription (
									String description )
	{
		super.set (ICargoSpace.DESCRIPTION , description );
	}
//	@ManyToOne(targetEntity=CargoSpaceType.class,fetch=FetchType.LAZY)
	@ManyToOne(targetEntity=CargoSpaceType.class)
	@JoinColumn(name="CargoSpaceType_identifier")
	public CargoSpaceType getCargoSpaceType ( )
	{
		return this.get(ICargoSpace.CARGOSPACETYPE) ;
	}

	public void setCargoSpaceType (
									CargoSpaceType cargoSpaceType )
	{
		super.set (ICargoSpace.CARGOSPACETYPE , cargoSpaceType );
	}
//	@ManyToOne(targetEntity=Depot.class,fetch=FetchType.LAZY)
	@ManyToOne(targetEntity=Depot.class)
	@JoinColumn(name="depot_identifier")
	
	public Depot getDepot ( )
	{
		return this.get(ICargoSpace.DEPOT) ;
	}

	public void setDepot (
							Depot depot )
	{
		super.set (ICargoSpace.DEPOT , depot );
	}
	@ManyToOne(targetEntity=Address.class,fetch=FetchType.LAZY)
	public Address getAddress ( )
	{
		return this.get(ICargoSpace.ADDRESS) ;
	}

	public void setAddress (
								Address address )
	{
		super.set (ICargoSpace.ADDRESS , address );
	}
	@ Column ( name = "specificAddress" , length = 100 )
	@ Index ( name = "specificAddressIndex" )
	public String getSpecificAddress ( )
	{
		return this.get(ICargoSpace.SPECIFICADDRESS) ;
	}

	public void setSpecificAddress (
										String specificAddress )
	{
		super.set (ICargoSpace.SPECIFICADDRESS , specificAddress );
	}
	@ManyToOne(targetEntity=Person.class,fetch=FetchType.LAZY)
	@JoinColumn(name="person_identifier")
	public Person getPrincipalPerson ( )
	{
		return this.get(ICargoSpace.PRINCIPALPERSON) ;
	}

	public void setPrincipalPerson (
										Person principalPerson )
	{
		super.set (ICargoSpace.PRINCIPALPERSON , principalPerson );
	}
	
//	@OneToMany(targetEntity=Supplier.class,fetch=FetchType.LAZY)
	@OneToMany(targetEntity=Supplier.class,fetch=FetchType.EAGER,cascade=CascadeType.ALL)
	@JoinColumn(name="cargoSpace_identifier")
	@IndexColumn(name="list_index")

	public List < Supplier > getSupplier ( )
	{
		return this.get(ICargoSpace.SUPPLIER) ;
	}

	public void setSupplier (
								List < Supplier > supplier )
	{
		super.set (ICargoSpace.SUPPLIER , supplier );
	}
@OneToMany(targetEntity=Customer.class,fetch=FetchType.LAZY)
	@JoinColumn(name="cargoSpace_identifier")
	@IndexColumn(name="list_index")

	public List < Customer > getCustomer ( )
	{
	return this.get(ICargoSpace.CUSTOMER) ;
	}

	public void setCustomer (
								List <Customer > customer )
	{
		super.set (ICargoSpace.CUSTOMER , customer );
	}
	@ Column ( name = "width" , length = 100 )
	@ Index ( name = "widthIndex" )
	public Double getWidth ( )
	{
		return this.get(ICargoSpace.WIDTH) ;
	}

	public void setWidth (
							Double width )
	{
		super.set (ICargoSpace.WIDTH , width );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getWidthUnits ( )
	{
		return this.get(ICargoSpace.WIDTHUNITS) ;
	}

	public void setWidthUnits (
								Units widthUnits )
	{
		super.set (ICargoSpace.WIDTHUNITS , widthUnits );
	}
	@ Column ( name = "length" , length = 100 )
	@ Index ( name = "lengthIndex" )
	public BigDecimal getLength ( )
	{
		return this.get(ICargoSpace.LENGTH) ;
	}

	public void setLength (
							BigDecimal length )
	{
		super.set (ICargoSpace.LENGTH , length );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getLengthUnits ( )
	{
		return this.get(ICargoSpace.LENGTHINITS) ;
	}

	public void setLengthUnits (
									Units lengthUnits )
	{
		super.set (ICargoSpace.LENGTHINITS , lengthUnits );
	}
	@ Column ( name = "depth" , length = 100 )
	@ Index ( name = "depthIndex" )
	public BigDecimal getDepth ( )
	{
		return this.get(ICargoSpace.DEPTH) ;
	}

	public void setDepth (
							BigDecimal depth )
	{
		super.set (ICargoSpace.DEPTH , depth );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getDepthUnits ( )
	{
		return this.get(ICargoSpace.DEPTHUNITS) ;
	}

	public void setDepthUnits (
								Units depthUnits )
	{
		super.set (ICargoSpace.DEPTHUNITS , depthUnits );
	}
	@ Column ( name = "maxWeight" , length = 100 )
	@ Index ( name = "maxWeightIndex" )
	public BigDecimal getMaxWeight ( )
	{
		return this.get(ICargoSpace.MAXWEIGHT) ;
	}

	public void setMaxWeight (
								BigDecimal maxWeight )
	{
		super.set (ICargoSpace.MAXWEIGHT , maxWeight );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getMaxWeightUnits ( )
	{
		return this.get(ICargoSpace.MAXWEIGHTUNITS) ;
	}

	public void setMaxWeightUnits (
									Units maxWeightUnits )
	{
		super.set (ICargoSpace.MAXWEIGHTUNITS , maxWeightUnits );
	}
	@ Column ( name = "maxCapacity" , length = 100 )
	@ Index ( name = "maxCapacityIndex" )
	public BigDecimal getMaxCapacity ( )
	{
		return this.get(ICargoSpace.MAXCAPACITY) ;
	}

	public void setMaxCapacity (
									BigDecimal maxCapacity )
	{
		super.set (ICargoSpace.MAXCAPACITY , maxCapacity );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getMaxCapacityUnits ( )
	{
		return this.get(ICargoSpace.MAXCAPACITYUNITS) ;
	}

	public void setMaxCapacityUnits (
										Units maxCapacityUnits )
	{
		super.set (ICargoSpace.MAXCAPACITYUNITS , maxCapacityUnits );
	}
	@ Column ( name = "usewidth" , length = 100 )
	@ Index ( name = "usewidthIndex" )
	public BigDecimal getUsewidth ( )
	{
		return this.get(ICargoSpace.USEWEIGHT) ;
	}

	public void setUsewidth (
								BigDecimal usewidth )
	{
		super.set (ICargoSpace.USEWEIGHT , usewidth );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getUsewidthUnits ( )
	{
		return this.get(ICargoSpace.USEWEIGHTUNITS) ;
	}

	public void setUsewidthUnits (
									Units usewidthUnits )
	{
		super.set (ICargoSpace.USEWEIGHTUNITS , usewidthUnits );
	}
	@ Column ( name = "uselength" , length = 100 )
	@ Index ( name = "uselengthIndex" )
	public BigDecimal getUselength ( )
	{
		return this.get(ICargoSpace.USELENGTH) ;
	}

	public void setUselength (
								BigDecimal uselength )
	{
		super.set (ICargoSpace.USELENGTH , uselength );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getUselengthUnits ( )
	{
		return this.get(ICargoSpace.USELENGTHUNTIS) ;
	}

	public void setUselengthUnits (
									Units uselengthUnits )
	{
		super.set (ICargoSpace.USELENGTHUNTIS , uselengthUnits );
	}
	@ Column ( name = "usedepth" , length = 100 )
	@ Index ( name = "usedepthIndex" )
	public BigDecimal getUsedepth ( )
	{
		return this.get(ICargoSpace.USEDEPTH) ;
	}

	public void setUsedepth (
								BigDecimal usedepth )
	{
		super.set (ICargoSpace.USEDEPTH , usedepth );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getUsedepthUnits ( )
	{
		return this.get(ICargoSpace.USEDEPTHUNITS) ;
	}

	public void setUsedepthUnits (
									Units usedepthUnits )
	{
		super.set (ICargoSpace.USEDEPTHUNITS , usedepthUnits );
	}
	@ Column ( name = "useWeight" , length = 100 )
	@ Index ( name = "useWeightIndex" )
	public BigDecimal getUseWeight ( )
	{
		return this.get(ICargoSpace.USEWEIGHT) ;
	}

	public void setUseWeight (
								BigDecimal useWeight )
	{
		super.set (ICargoSpace.USEWEIGHT , useWeight );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getUseWeightUnits ( )
	{
		return this.get(ICargoSpace.USEWEIGHTUNITS) ;
	}

	public void setUseWeightUnits (
									Units useWeightUnits )
	{
		super.set (ICargoSpace.USEWEIGHTUNITS , useWeightUnits );
	}
	@ Column ( name = "useCapacity" , length = 100 )
	@ Index ( name = "useCapacityIndex" )
	public BigDecimal getUseCapacity ( )
	{
		return this.get(ICargoSpace.USECAPACITY) ;
	}

	public void setUseCapacity (
									BigDecimal useCapacity )
	{
		super.set (ICargoSpace.USECAPACITY , useCapacity );
	}
	@ManyToOne(targetEntity=Units.class,fetch=FetchType.LAZY)
	public Units getUseCapacityUnits ( )
	{
		return this.get(ICargoSpace.USECAPACITYUNITS) ;
	}

	public void setUseCapacityUnits (
										Units useCapacityUnits )
	{
		super.set (ICargoSpace.USECAPACITYUNITS , useCapacityUnits );
	}
	@ Column ( name = "isappointCargoSpace" , length = 100 )
	@ Index ( name = "isappointCargoSpaceIndex" )
	public Boolean getIsappointCargoSpace ( )
	{
		return this.get(ICargoSpace.ISAPPOINTCARGOSPACE) ;
	}

	public void setIsappointCargoSpace (
											Boolean isappointCargoSpace )
	{
		super.set (ICargoSpace.ISAPPOINTCARGOSPACE , isappointCargoSpace );
	}
	@ Column ( name = "iseffective" , length = 100 )
	@ Index ( name = "iseffectiveIndex" )
	public Boolean getIseffective ( )
	{
		return this.get(ICargoSpace.ISEFFECTIVE) ;
	}

	public void setIseffective (
									Boolean iseffective )
	{
		super.set (ICargoSpace.ISEFFECTIVE , iseffective );
	}
	
	@ Column ( name = "isSubCargoSpace" , length = 100 )
	@ Index ( name = "isSubCargoSpaceIndex" )
	public Boolean getIsSubCargoSpace ( )
	{
		return this.get(ICargoSpace.ISSUBCARGOSPASE) ;
	}

	public void setIsSubCargoSpace (
										Boolean isSubCargoSpace )
	{
		super.set (ICargoSpace.ISSUBCARGOSPASE , isSubCargoSpace );
	}
 @ManyToOne(targetEntity=CargoSpaceGroup.class,fetch=FetchType.LAZY)
	public CargoSpaceGroup getCargoSpaceGroup ( )
	{
	 return this.get(ICargoSpace.CARGOSPACEGROUP) ;
	}

	public void setCargoSpaceGroup (
										CargoSpaceGroup cargoSpaceGroup )
	{
		super.set (ICargoSpace.CARGOSPACEGROUP , cargoSpaceGroup );
	}
	@ Column ( name = "effectiveDate" , length = 100 )
	@ Index ( name = "effectiveDateIndex" )
	public Date getEffectiveDate ( )
	{
		return this.get(ICargoSpace.EFFECTIVEDATE) ;
	}

	public void setEffectiveDate (
									Date effectiveDate )
	{
		super.set (ICargoSpace.EFFECTIVEDATE , effectiveDate );
	}
	@ Column ( name = "invalidationDate" , length = 100 )
	@ Index ( name = "invalidationDateIndex" )
	public Date getInvalidationDate ( )
	{
		return this.get(ICargoSpace.INVALIDATIONDATE) ;
	}

	public void setInvalidationDate (
										Date invalidationDate )
	{
		super.set (ICargoSpace.INVALIDATIONDATE , invalidationDate );
	}

	public CargoSpace ( )
	{
		super ( ) ;
	}

	
	
	
}
